	<script type="text/javascript" language="javascript" src="{$smarty.const.THEME_RELATIVE}lytebox.js"></script>
	<div>
<div class="newsmodule viewsingle">				
			<div id="midcol">
				<div class="">
  <h1>{$album->name}</h1>
  <div class="cont01" style="padding-top: 0px;">
    <div class="padT5 padB10 padL0">
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td  valign=middle width=100>
          <a {if $album->picpath != ""} href='{$album->picpath}' rel="lytebox" {/if} >
				<img class="cont11" src={if $album->picpath != ""} "{$smarty.const.PATH_RELATIVE}phpThumb.php?src={$album->picpath}&w=100&h=120"  {else} "{$smarty.const.PATH_RELATIVE}phpThumb.php?src={$smarty.const.THEME_RELATIVE}images/album.jpg&w=100&h=120" {/if}/> 
				</a>
          </td>
         <td>
            <div>
              {$album->body}
            </div>
         </td>
        </tr>
      </table>
    </div>
  </div>

{* music no. *}
{assign var="music_no" value=0}
{assign var="playlist_music_no" value=-1}
  <table width="100%" border="0" cellspacing="0" cellpadding="0" class="normal" style="padding-top: 5px;">
{foreach from=$musics item=music}
<tr >
  <td width="1%" class="number" valign="top" >
  {assign var="music_no" value=$music_no+1}
  {$music_no}</td>
  
  <td width="58%" class="cont13" valign="top"><a href="#" onmouseover="Tip('{$music->info|escape:'quotes':'UTF-8'}',TITLE, '<div align=center style=\'padding-top: 5px; padding-bottom: 5px;\'>{$music->name|escape:'quotes':'UTF-8'}</div>' , BGCOLOR, '#4a4542', FONTCOLOR, '#FFFFFF', BORDERCOLOR, '#f79226', FADEIN, 150, FADEOUT, 100, WIDTH, 250)" onmouseout="UnTip()"><strong>{$music->name}</strong></a>&nbsp;{if $music->top_hit ==1 }<img src='{$smarty.const.THEME_RELATIVE}images/tophit.gif' border=0>{/if}<br />
    <span class="lnk04 small"><a href="{link action=search_singer module=musicsmodule search_string=$music->singer_search}" {if $smarty.const.LANG == $smarty.const.LANG_ENGLISH} title='Search all music performed by {$music->singer}' alt='Search all music performed by {$music->singer}' {else}  title='Tìm các bài hát được trình bày bởi {$music->singer}' alt='Tìm các bài hát được trình bày bởi {$music->singer}' {/if}>{$music->singer}</a></span></td>
    
  <td width="20%" align="center" class="cont13">{if $music->high_quality=='' && $music->sheet_music == '' && $music->demo == '' && $music->sound_trackmix == ''}{else}
  {if $music->high_quality !=''}
  	{assign var="playlist_music_no" value=$playlist_music_no+1}
	<a href="javascript:sendEvent('playitem', {$playlist_music_no})" {if $smarty.const.LANG == $smarty.const.LANG_ENGLISH} title='Listen "{$music->name}"{if $in_compact_model == 1 }. Next click will stop music playing{/if}' alt='Listen "{$music->name}"{if $in_compact_model == 1 }. Next click will stop music playing{/if}' {else}  title='Nghe bài hát "{$music->name}"{if $in_compact_model == 1 }. Bấm lần tiếp theo để dừng phát nhạc{/if}' alt='Nghe bài hát "{$music->name}"{if $in_compact_model == 1 }. Bấm lần tiếp theo để dừng phát nhạc{/if}' {/if}><img src="{$smarty.const.THEME_RELATIVE}images/ico_headset.gif" width="19" height="17" /></a>  	
  {/if}
  {if $music->downloadable > 0}<a href="{link action=download_file id=$music->id id2=$music->high_quality_id}" {if $smarty.const.LANG == $smarty.const.LANG_ENGLISH} title='Download "{$music->name}"' alt='Download "{$music->name}"' {else}  title='Tải bài "{$music->name}" về máy' alt='Tải bài "{$music->name} về máy' {/if}><img src="{$smarty.const.THEME_RELATIVE}images/download_icon.png" width="19" height="17" /></a>{/if}{/if}
  
  {permissions level=$smarty.const.UILEVEL_PERMISSIONS}
							{if $permissions.administrate == 1}
							<a href="index.php?module=musicsmodule&action=edit_musics&album_id={$album->id}&id={$music->id}" title="Edit this entry">
				<img src="{$smarty.const.ICON_RELATIVE}edit.png" title="{$_TR.alt_edit}" alt="{$_TR.alt_edit}" />
			</a>
			<a href="{link action=delete_music id=$music->id}" title="Delete this entry">
				<img src="{$smarty.const.ICON_RELATIVE}delete.png" title="{$_TR.alt_delete}" alt="{$_TR.alt_delete}" />
			</a>
							{/if}
							{/permissions}
  
  </td>

  <td width="20%" align="center" class="cont12">{if $music->fileformat !=""}<img src="{$smarty.const.THEME_RELATIVE}images/icon_{$music->fileformat}.gif" width="32" height="14" />{/if}<br />
    {if $music->bitrate!= "" }<strong>{$music->bitrate} Kbps</strong>{/if}<br />
    {$music->file_length} </td>
  <td width="1%">&nbsp;</td>
</tr>
{/foreach}
  </table>
</div>
</div>
{* music player *}
<br>

<div id="myplayer_holder" align=center name="myplayer"></div>
<script type="text/javascript">
var so = new SWFObject('{$smarty.const.THEME_RELATIVE}mediaplayer.swf','myplayer','{if $in_compact_model == 1 }
0 {else} 00 {/if}','{if $in_compact_model == 1 }
0 {else} 00 {/if}','0');
so.addParam('allowscriptaccess','always');
so.addParam('allowfullscreen','true');
so.addVariable('height','300');
so.addVariable('width','280');
so.addVariable('autostart','true');
so.addVariable('file','{$smarty.const.THEME_RELATIVE}../../tmp/playlist/{$plist}');
so.addVariable('displaywidth','0');
so.addVariable('javascriptid','myplayer');
so.addVariable('searchbar','false');
so.addVariable('usefullscreen','true');
so.addVariable("enablejs","true");
so.addVariable("linktarget","_self");
so.write('myplayer_holder');

{literal}
// for music change
// This is a javascript handler for the player and is always needed.
function thisMovie(movieName) {
	if(navigator.appName.indexOf("Microsoft") != -1) {
		return window[movieName];
	} else {
		return document[movieName];
	}
};

var current_item=0;
// this function is caught by the JavascriptView object of the player.
function sendEvent(typ,prm) { 
	if (typ == "playitem")
	{
		if (current_item == prm)
			{ sendEvent("stop"); return; }
		else
			current_item = prm;
	}
	thisMovie("myplayer").sendEvent(typ,prm); 
};

{/literal}

</script>

</div>

